import { MockMethod } from 'vite-plugin-mock';
import { resultPageSuccess, resultSuccess } from '../_util';

const demoList = (() => {
  const result: any[] = [];
  for (let index = 0; index < 60; index++) {
    result.push({
      id: `${index}`,
      name: '@ctitle',
      'userIn_dictText|1': ['张三', '李四', '王五'],
      'userOut_dictText|1': ['张三', '李四', '王五'],
      unitPrice: '@integer(100,200)',
      count: '@integer(1,10)',
      availableQuantity: '@integer(1,10)',
      quantityOccupied: '@integer(1,10)',
      description: '@ctitle',
      asset: '办公椅',
      'approver|1': ['huangrui', 'cjy'],
      assetList: '1730825536185794561,1730827627570589697',
      createBy: 'huangrui',
      date: '2023-12-07 17:47:59',
      department: null,
      documentFile: null,
      position: '1729767526306824194',
      remark: null,
      'status|1': ['1', '2', '3'],
      updateBy: 'huangrui',
      updateTime: '2024-01-09 10:53:15',
      user: null,
    });
  }
  return result;
})();

enum Api {
  list = '/assettransfer/assetTransfer/list',
  save = '/assettransfer/assetTransfer/add',
  edit = '/assettransfer/assetTransfer/edit',
  deleteOne = '/assettransfer/assetTransfer/delete',
  deleteBatch = '/assettransfer/assetTransfer/deleteBatch',
  importExcel = '/assettransfer/assetTransfer/importExcel',
  exportXls = '/assettransfer/assetTransfer/exportXls',
  queryById = '/assettransfer/assetTransfer/queryById',
}

const prefix = '/jeecgboot';
export default [
  // {
  //   url: prefix + Api.list,
  //   timeout: 1000,
  //   method: 'get',
  //   response: ({ query }) => {
  //     const { page = 1, pageSize = 20 } = query;
  //     return resultPageSuccess(page, pageSize, demoList);
  //   },
  // },
  // // {
  // //   url: prefix + Api.assetWarehousingDetailList,
  // //   timeout: 1000,
  // //   method: 'get',
  // //   response: ({ query }) => {
  // //     const { page = 1, pageSize = 20 } = query;
  // //     return resultPageSuccess(page, pageSize, demoList);
  // //   },
  // // },
  // {
  //   url: prefix + Api.save,
  //   timeout: 1000,
  //   method: 'post',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
  // {
  //   url: prefix + Api.edit,
  //   timeout: 1000,
  //   method: 'post',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
  // {
  //   url: prefix + Api.deleteOne,
  //   timeout: 1000,
  //   method: 'delete',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
  // {
  //   url: prefix + Api.importExcel,
  //   timeout: 1000,
  //   method: 'post',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
  // {
  //   url: prefix + Api.exportXls,
  //   timeout: 1000,
  //   method: 'get',
  //   response: () => {
  //     return resultSuccess('ok');
  //   },
  // },
] as MockMethod[];
